<?php
	$_nav='service';
	$_title='服务';
	include_once 'head.php';
	if($user_id==''){
		header('Location: login.php');
	}
	//左侧导航
	$my_label='collect';
	$smarty->assign('my_label',$my_label);	

	$servicec=new service();				//服务类
	$service_table='zs_service';			//子时服务表

	//所有收藏
	$key='c.*,s.logo,s.title';
	$num=16;
	$collects=$servicec->serviceCollectList($key,$num);

	//删除
	if($_GET['action']=='del'){
		$cid=$_POST['cid'];					//收藏id
		$res=$servicec->collectDel($cid);
		echo $res;
		exit();
	}

	$smarty->assign('collects',$collects['result']);
	//总数
	$total=count($collects['result']);
	$smarty->assign('total',$total);
	$smarty->assign('page',$collects['page']);
	$smarty->display("my_collect_service.html");
?>